﻿using QuanLyThuVien.DAL;
using QuanLyThuVien.DTO;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QuanLyThuVien.BLL
{
    //----------------------------------------------------------------------
    //Desc: class xử lý cho bảng CT_TACGIA
    //----------------------------------------------------------------------
    public class BLLCT_TacGia
    {
        //----------------------------------------------------------------------
        //Desc: constructor mặc định
        //----------------------------------------------------------------------
        public BLLCT_TacGia()
        { }

        //----------------------------------------------------------------------
        //Desc: Lấy danh sách tên tác giả
        //----------------------------------------------------------------------
        public List<string> LayDSTenTG(string madausach)
        {
            DALCT_TacGia _dalCT_TacGia = new DALCT_TacGia();
            return _dalCT_TacGia.LayDSTenTG(madausach);
        }

        //----------------------------------------------------------------------
        //Desc: cập nhât CT_TacGia
        //----------------------------------------------------------------------
        public bool CapNhat(DTOCT_TacGia cttg)
        {
            DALCT_TacGia _dalCT_TacGia = new DALCT_TacGia();
            return _dalCT_TacGia.CapNhat(cttg);
        }

        //----------------------------------------------------------------------
        //Desc: Xóa CT_TacGia
        //----------------------------------------------------------------------
        public bool Xoa(DTOCT_TacGia cttg)
        {
            DALCT_TacGia _dalCT_TacGia = new DALCT_TacGia();
            return _dalCT_TacGia.Xoa(cttg);
        }

        //----------------------------------------------------------------------
        //Desc: đếm CT_Tacgia
        //----------------------------------------------------------------------
        public int DemCTTacGia(DTOCT_TacGia cttg)
        {
            DALCT_TacGia _dalCT_TacGia = new DALCT_TacGia();
            return _dalCT_TacGia.DemCTTacGia(cttg);
        }
    }
}
